"use strict";

angular.module('app.user', ['ui.router'])
.config(function ($stateProvider,ACCESS_LEVELS) {
    $stateProvider
        .state('app.user', {
            abstract: true,
            data: {
                title: '用户'
            }
        })
        .state('app.user.allUser', {
            url: '/allUser',
            views: {
                "content@app": {
                    templateUrl: 'user/views/allUser.html',
                    controller: 'AllUserCtrl'
                }
            },
            data:{
                title: '用户列表',
                access_level:ACCESS_LEVELS.branch  
            }
        })
       .state('app.user.perUser', {
        url: '/perUser',
        views: {
            "content@app": {
                templateUrl: 'user/views/perUser.html',
                controller: 'PerUserCtrl'
            }
        },
        data:{
            title: '个人资料',
            access_level:ACCESS_LEVELS.branch  
        }
       })
        
        .state('app.user.modifyInformation', {
            url: '/modifyInformation',
            data: {
                title: '用户修改'
            },
            views: {
                "content@app": {
                    templateUrl: 'user/views/modifyInformation.html',
                    controller: 'ModifyInfoCtrl'
                }
            }
        })
 });


